package com.user.editor;

import java.io.UnsupportedEncodingException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

public class EncondingHttpServletRequest extends HttpServletRequestWrapper {
	
	private HttpServletRequest request;
	public EncondingHttpServletRequest(HttpServletRequest request) {
		super(request);
        this.request = request;
	}

	@Override
	public String getParameter(String name) {
		String value = request.getParameter(name);
		if(value!=null)
		{
			try {
				value = new String(value.getBytes("ISO8859-1"),"UTF-8");
			} catch (UnsupportedEncodingException e) {
			}
		}
		return value;
	}
	
}
